import { create } from 'zustand'


interface userInfo {
    username: string;
    name?: string;
    age?: number;
    email?: string;
    password: string;
    avatar?: string;
}
const useUserInfoStore = create<{ userInfo: userInfo } & { setUserInfo: (userInfo: userInfo) => void }>((set) => ({
    userInfo: {
        name: '',
        age: 0,
        email: '',
        password: '',
        avatar: '',
        username: '',
    },
    setUserInfo: (userInfo: userInfo) => set({ userInfo }),
}))

export default useUserInfoStore;